home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / lispref.info-24 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  49.5 KB  |  1,253 lines

  1. This is Info file ../../info/lispref.info, produced by Makeinfo-1.63
  2. from the input file lispref.texi.
  3.  
  4.    Edition History:
  5.  
  6.    GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993 GNU
  7. Emacs Lisp Reference Manual Further Revised (v2.02), August 1993 Lucid
  8. Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
  9. XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
  10. GNU Emacs Lisp Reference Manual v2.4, June 1995 XEmacs Lisp
  11. Programmer's Manual (for 19.13) Third Edition, July 1995
  12.  
  13.    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software
  14. Foundation, Inc.  Copyright (C) 1994, 1995 Sun Microsystems, Inc.
  15. Copyright (C) 1995 Amdahl Corporation.  Copyright (C) 1995 Ben Wing.
  16.  
  17.    Permission is granted to make and distribute verbatim copies of this
  18. manual provided the copyright notice and this permission notice are
  19. preserved on all copies.
  20.  
  21.    Permission is granted to copy and distribute modified versions of
  22. this manual under the conditions for verbatim copying, provided that the
  23. entire resulting derived work is distributed under the terms of a
  24. permission notice identical to this one.
  25.  
  26.    Permission is granted to copy and distribute translations of this
  27. manual into another language, under the above conditions for modified
  28. versions, except that this permission notice may be stated in a
  29. translation approved by the Foundation.
  30.  
  31.    Permission is granted to copy and distribute modified versions of
  32. this manual under the conditions for verbatim copying, provided also
  33. that the section entitled "GNU General Public License" is included
  34. exactly as in the original, and provided that the entire resulting
  35. derived work is distributed under the terms of a permission notice
  36. identical to this one.
  37.  
  38.    Permission is granted to copy and distribute translations of this
  39. manual into another language, under the above conditions for modified
  40. versions, except that the section entitled "GNU General Public License"
  41. may be included in a translation approved by the Free Software
  42. Foundation instead of in the original English.
  43.  
  44. 
  45. File: lispref.info,  Node: Creating Frames,  Next: Frame Parameters,  Up: Frames
  46.  
  47. Creating Frames
  48. ===============
  49.  
  50.    To create a new frame, call the function `make-frame'.
  51.  
  52.  - Function: make-frame &optional ALIST DEVICE
  53.      This function creates a new frame on DEVICE, if DEVICE permits
  54.      creation of frames.  (An X server does; an ordinary terminal does
  55.      not.) DEVICE defaults to the selected device if omitted.  *Note
  56.      Devices::.
  57.  
  58.      The argument is an alist specifying frame parameters.  Any
  59.      parameters not mentioned in ALIST default according to the value
  60.      of the variable `default-frame-alist'.  For X devices, parameters
  61.      not specified in `default-frame-alist' default in turn from
  62.      `default-x-frame-alist' and, if not specified there, from the X
  63.      resources.  For TTY devices, `default-tty-frame-alist' is
  64.      consulted as well as `default-frame-alist'.
  65.  
  66.      The set of possible parameters depends in principle on what kind of
  67.      window system XEmacs uses to display its frames.  *Note X Frame
  68.      Parameters::, for documentation of individual parameters you can
  69.      specify when creating an X window frame.
  70.  
  71. 
  72. File: lispref.info,  Node: Frame Parameters,  Next: Frame Titles,  Prev: Creating Frames,  Up: Frames
  73.  
  74. Frame Parameters
  75. ================
  76.  
  77.    A frame has many parameters that control its appearance and behavior.
  78. Just what parameters a frame has depends on what display mechanism it
  79. uses.
  80.  
  81.    Frame parameters exist for the sake of window systems.  A terminal
  82. frame has a few parameters, mostly for compatibility's sake; only the
  83. height, width and `buffer-predicate' parameters really do something.
  84.  
  85. * Menu:
  86.  
  87. * Parameter Access::       How to change a frame's parameters.
  88. * Initial Parameters::       Specifying frame parameters when you make a frame.
  89. * X Frame Parameters::     List of frame parameters.
  90. * Size and Position::      Changing the size and position of a frame.
  91. * Frame Name::             The name of a frame (as opposed to its title).
  92.  
  93. 
  94. File: lispref.info,  Node: Parameter Access,  Next: Initial Parameters,  Up: Frame Parameters
  95.  
  96. Access to Frame Parameters
  97. --------------------------
  98.  
  99.    These functions let you read and change the parameter values of a
  100. frame.
  101.  
  102.  - Function: frame-parameters FRAME
  103.      The function `frame-parameters' returns an alist listing all the
  104.      parameters of FRAME and their values.
  105.  
  106.  - Function: modify-frame-parameters FRAME ALIST
  107.      This function alters the parameters of frame FRAME based on the
  108.      elements of ALIST.  Each element of ALIST has the form `(PARM .
  109.      VALUE)', where PARM is a symbol naming a parameter.  If you don't
  110.      mention a parameter in ALIST, its value doesn't change.
  111.  
  112. 
  113. File: lispref.info,  Node: Initial Parameters,  Next: X Frame Parameters,  Prev: Parameter Access,  Up: Frame Parameters
  114.  
  115. Initial Frame Parameters
  116. ------------------------
  117.  
  118.    You can specify the parameters for the initial startup frame by
  119. setting `initial-frame-alist' in your `.emacs' file.
  120.  
  121.  - Variable: initial-frame-alist
  122.      This variable's value is an alist of parameter values used when
  123.      creating the initial X window frame.  Each element has the form:
  124.  
  125.           (PARAMETER . VALUE)
  126.  
  127.      Emacs creates the initial frame before it reads your `~/.emacs'
  128.      file.  After reading that file, Emacs checks `initial-frame-alist',
  129.      and applies the parameter settings in the altered value to the
  130.      already created initial frame.
  131.  
  132.      If these settings affect the frame geometry and appearance, you'll
  133.      see the frame appear with the wrong ones and then change to the
  134.      specified ones.  If that bothers you, you can specify the same
  135.      geometry and appearance with X resources; those do take affect
  136.      before the frame is created.  *Note X Resources: (emacs)Resources
  137.      X.
  138.  
  139.      X resource settings typically apply to all frames.  If you want to
  140.      specify some X resources solely for the sake of the initial frame,
  141.      and you don't want them to apply to subsequent frames, here's how
  142.      to achieve this.  Specify parameters in `default-frame-alist' to
  143.      override the X resources for subsequent frames; then, to prevent
  144.      these from affecting the initial frame, specify the same
  145.      parameters in `initial-frame-alist' with values that match the X
  146.      resources.
  147.  
  148.  - Variable: default-frame-alist
  149.      This is an alist specifying default values of frame parameters for
  150.      subsequent Emacs frames (not the initial ones).
  151.  
  152.    See also `special-display-frame-alist', in *Note Choosing Window::.
  153.  
  154.    If you use options that specify window appearance when you invoke
  155. Emacs, they take effect by adding elements to `default-frame-alist'.
  156. One exception is `-geometry', which adds the specified position to
  157. `initial-frame-alist' instead.  *Note Command Arguments: (emacs)Command
  158. Arguments.
  159.  
  160. 
  161. File: lispref.info,  Node: X Frame Parameters,  Next: Size and Position,  Prev: Initial Parameters,  Up: Frame Parameters
  162.  
  163. X Window Frame Parameters
  164. -------------------------
  165.  
  166.    Just what parameters a frame has depends on what display mechanism it
  167. uses.  Here is a table of the parameters of an X window frame; of these,
  168. `name', `height', `width', and `buffer-predicate' provide meaningful
  169. information in non-X frames.
  170.  
  171. `name'
  172.      The name of the frame.  Most window managers display the frame's
  173.      name in the frame's border, at the top of the frame.  If you don't
  174.      specify a name, and you have more than one frame, Emacs sets the
  175.      frame name based on the buffer displayed in the frame's selected
  176.      window.
  177.  
  178.      If you specify the frame name explicitly when you create the
  179.      frame, the name is also used (instead of the name of the Emacs
  180.      executable) when looking up X resources for the frame.
  181.  
  182. `display'
  183.      The display on which to open this frame.  It should be a string of
  184.      the form `"HOST:DPY.SCREEN"', just like the `DISPLAY' environment
  185.      variable.
  186.  
  187. `left'
  188.      The screen position of the left edge, in pixels, with respect to
  189.      the left edge of the screen.  The value may be a positive number
  190.      POS, or a list of the form `(+ POS)' which permits specifying a
  191.      negative POS value.
  192.  
  193.      A negative number -POS, or a list of the form `(- POS)', actually
  194.      specifies the position of the right edge of the window with
  195.      respect to the right edge of the screen.  A positive value of POS
  196.      counts toward the left.  If the parameter is a negative integer
  197.      -POS then POS is positive!
  198.  
  199. `top'
  200.      The screen position of the top edge, in pixels, with respect to the
  201.      top edge of the screen.  The value may be a positive number POS,
  202.      or a list of the form `(+ POS)' which permits specifying a
  203.      negative POS value.
  204.  
  205.      A negative number -POS, or a list of the form `(- POS)', actually
  206.      specifies the position of the bottom edge of the window with
  207.      respect to the bottom edge of the screen.  A positive value of POS
  208.      counts toward the top.  If the parameter is a negative integer
  209.      -POS then POS is positive!
  210.  
  211. `icon-left'
  212.      The screen position of the left edge *of the frame's icon*, in
  213.      pixels, counting from the left edge of the screen.  This takes
  214.      effect if and when the frame is iconified.
  215.  
  216. `icon-top'
  217.      The screen position of the top edge *of the frame's icon*, in
  218.      pixels, counting from the top edge of the screen.  This takes
  219.      effect if and when the frame is iconified.
  220.  
  221. `user-position'
  222.      Non-`nil' if the screen position of the frame was explicitly
  223.      requested by the user (for example, with the `-geometry' option).
  224.      Nothing automatically makes this parameter non-`nil'; it is up to
  225.      Lisp programs that call `make-frame' to specify this parameter as
  226.      well as specifying the `left' and `top' parameters.
  227.  
  228. `height'
  229.      The height of the frame contents, in characters.  (To get the
  230.      height in pixels, call `frame-pixel-height'; see *Note Size and
  231.      Position::.)
  232.  
  233. `width'
  234.      The width of the frame contents, in characters.  (To get the
  235.      height in pixels, call `frame-pixel-width'; see *Note Size and
  236.      Position::.)
  237.  
  238. `window-id'
  239.      The number of the X window for the frame.
  240.  
  241. `minibuffer'
  242.      Whether this frame has its own minibuffer.  The value `t' means
  243.      yes, `nil' means no, `only' means this frame is just a minibuffer.
  244.      If the value is a minibuffer window (in some other frame), the
  245.      new frame uses that minibuffer. (Minibuffer-only and
  246.      minibuffer-less frames are not yet implemented in XEmacs.)
  247.  
  248. `scroll-bar-width'
  249.      The width of the vertical scroll bar, in pixels.
  250.  
  251. `cursor-color'
  252.      The color for the cursor that shows point.
  253.  
  254. `border-color'
  255.      The color for the border of the frame.
  256.  
  257. `border-width'
  258.      The width in pixels of the window border.
  259.  
  260. `internal-border-width'
  261.      The distance in pixels between text and border.
  262.  
  263. `unsplittable'
  264.      If non-`nil', this frame's window is never split automatically.
  265.  
  266. `inter-line-space'
  267.      The space in pixels between adjacent lines of text. (Not currently
  268.      implemented.)
  269.  
  270. `modeline'
  271.      Whether the frame has a modeline.
  272.  
  273. 
  274. File: lispref.info,  Node: Size and Position,  Next: Frame Name,  Prev: X Frame Parameters,  Up: Frame Parameters
  275.  
  276. Frame Size And Position
  277. -----------------------
  278.  
  279.    You can read or change the size and position of a frame using the
  280. frame parameters `left', `top', `height', and `width'.  Whatever
  281. geometry parameters you don't specify are chosen by the window manager
  282. in its usual fashion.
  283.  
  284.    Here are some special features for working with sizes and positions:
  285.  
  286.  - Function: set-frame-position FRAME LEFT TOP
  287.      This function sets the position of the top left corner of FRAME to
  288.      LEFT and TOP.  These arguments are measured in pixels, and count
  289.      from the top left corner of the screen.  Negative parameter values
  290.      count up or rightward from the top left corner of the screen.
  291.  
  292.  - Function: frame-height &optional FRAME
  293.  - Function: frame-width &optional FRAME
  294.      These functions return the height and width of FRAME, measured in
  295.      lines and columns.  If you don't supply FRAME, they use the
  296.      selected frame.
  297.  
  298.  - Function: frame-pixel-height &optional FRAME
  299.  - Function: frame-pixel-width &optional FRAME
  300.      These functions return the height and width of FRAME, measured in
  301.      pixels.  If you don't supply FRAME, they use the selected frame.
  302.  
  303.  - Function: set-frame-size FRAME COLS ROWS &optional PRETEND
  304.      This function sets the size of FRAME, measured in characters; COLS
  305.      and ROWS specify the new width and height.  (If PRETEND is
  306.      non-nil, it means that redisplay should act as if the frame's size
  307.      is COLS by ROWS, but the actual size of the frame should not be
  308.      changed.  You should not normally use this option.)
  309.  
  310.    You can also use the functions `set-frame-height' and
  311. `set-frame-width' to set the height and width individually.  The frame
  312. is the first argument and the size (in rows or columns) is the second.
  313. (There is an optional third argument, PRETEND, which has the same
  314. purpose as the corresponding argument in `set-frame-size'.)
  315.  
  316. 
  317. File: lispref.info,  Node: Frame Name,  Prev: Size and Position,  Up: Frame Parameters
  318.  
  319. The Name of a Frame (As Opposed to Its Title)
  320. ---------------------------------------------
  321.  
  322.    Under X, every frame has a name, which is not the same as the title
  323. of the frame.  A frame's name is used to look up its resources and does
  324. not normally change over the lifetime of a frame.  It is perfectly
  325. allowable, and quite common, for multiple frames to have the same name.
  326.  
  327.  - Function: frame-name &optional FRAME
  328.      This function returns the name of FRAME, which defaults to the
  329.      selected frame if not specified.  The name of a frame can also be
  330.      obtained from the frame's parameters.  *Note Frame Parameters::.
  331.  
  332.  - Variable: default-frame-name
  333.      This variable holds the default name to assign to newly-created
  334.      frames.  This can be overridden by arguments to `make-frame'.  This
  335.      must be a string.
  336.  
  337. 
  338. File: lispref.info,  Node: Frame Titles,  Next: Deleting Frames,  Prev: Frame Parameters,  Up: Frames
  339.  
  340. Frame Titles
  341. ============
  342.  
  343.    Every frame has a title; most window managers display the frame
  344. title at the top of the frame.  You can specify an explicit title with
  345. the `name' frame property.  But normally you don't specify this
  346. explicitly, and Emacs computes the title automatically.
  347.  
  348.    Emacs computes the frame title based on a template stored in the
  349. variable `frame-title-format'.
  350.  
  351.  - Variable: frame-title-format
  352.      This variable specifies how to compute a title for a frame when
  353.      you have not explicitly specified one.
  354.  
  355.      The variable's value is actually a modeline construct, just like
  356.      `modeline-format'.  *Note Modeline Data::.
  357.  
  358.  - Variable: frame-icon-title-format
  359.      This variable specifies how to compute the title for an iconified
  360.      frame, when you have not explicitly specified the frame title.
  361.      This title appears in the icon itself.
  362.  
  363.  - Function: x-set-frame-icon-pixmap FRAME PIXMAP &optional MASK
  364.      This function sets the icon of the given frame to the given image
  365.      instance, which should be an image instance object (as returned by
  366.      `make-image-instance'), a glyph object (as returned by
  367.      `make-glyph'), or `nil'.  If a glyph object is given, the glyph
  368.      will be instantiated on the frame to produce an image instance
  369.      object.
  370.  
  371.      If the given image instance has a mask, that will be used as the
  372.      icon mask; however, not all window managers support this.
  373.  
  374.      The window manager is also not required to support color pixmaps,
  375.      only bitmaps (one plane deep).
  376.  
  377.      If the image instance does not have a mask, then the optional
  378.      third argument may be the image instance to use as the mask (it
  379.      must be one plane deep).  *Note Glyphs::.
  380.  
  381. 
  382. File: lispref.info,  Node: Deleting Frames,  Next: Finding All Frames,  Prev: Frame Titles,  Up: Frames
  383.  
  384. Deleting Frames
  385. ===============
  386.  
  387.    Frames remain potentially visible until you explicitly "delete"
  388. them.  A deleted frame cannot appear on the screen, but continues to
  389. exist as a Lisp object until there are no references to it.
  390.  
  391.  - Command: delete-frame &optional FRAME
  392.      This function deletes the frame FRAME.  By default, FRAME is the
  393.      selected frame.
  394.  
  395.  - Function: frame-live-p FRAME
  396.      The function `frame-live-p' returns non-`nil' if the frame FRAME
  397.      has not been deleted.
  398.  
  399. 
  400. File: lispref.info,  Node: Finding All Frames,  Next: Frames and Windows,  Prev: Deleting Frames,  Up: Frames
  401.  
  402. Finding All Frames
  403. ==================
  404.  
  405.  - Function: frame-list
  406.      The function `frame-list' returns a list of all the frames that
  407.      have not been deleted.  It is analogous to `buffer-list' for
  408.      buffers.  The list that you get is newly created, so modifying the
  409.      list doesn't have any effect on the internals of XEmacs.
  410.  
  411.  - Function: device-frame-list &optional DEVICE
  412.      This function returns a list of all frames on DEVICE.  If DEVICE
  413.      is `nil', the selected device will be used.
  414.  
  415.  - Function: visible-frame-list &optional DEVICE
  416.      This function returns a list of just the currently visible frames.
  417.      If DEVICE is specified only frames on that device will be returned.
  418.      *Note Visibility of Frames::.  (TTY frames always count as
  419.      "visible", even though only the selected one is actually
  420.      displayed.)
  421.  
  422.  - Function: next-frame &optional FRAME MINIBUF
  423.      The function `next-frame' lets you cycle conveniently through all
  424.      the frames from an arbitrary starting point.  It returns the "next"
  425.      frame after FRAME in the cycle.  If FRAME is omitted or `nil', it
  426.      defaults to the selected frame.
  427.  
  428.      The second argument, MINIBUF, says which frames to consider:
  429.  
  430.     `nil'
  431.           Exclude minibuffer-only frames.
  432.  
  433.     `visible'
  434.           Consider all visible frames.
  435.  
  436.     0
  437.           Consider all visible or iconified frames.
  438.  
  439.     a window
  440.           Consider only the frames using that particular window as their
  441.           minibuffer.
  442.  
  443.     the symbol `visible'
  444.           Include all visible frames.
  445.  
  446.     `0'
  447.           Include all visible and iconified frames.
  448.  
  449.     anything else
  450.           Consider all frames.
  451.  
  452.  - Function: previous-frame &optional FRAME MINIBUF
  453.      Like `next-frame', but cycles through all frames in the opposite
  454.      direction.
  455.  
  456.    See also `next-window' and `previous-window', in *Note Cyclic Window
  457. Ordering::.
  458.  
  459. 
  460. File: lispref.info,  Node: Frames and Windows,  Next: Minibuffers and Frames,  Prev: Finding All Frames,  Up: Frames
  461.  
  462. Frames and Windows
  463. ==================
  464.  
  465.    Each window is part of one and only one frame; you can get the frame
  466. with `window-frame'.
  467.  
  468.  - Function: frame-root-window &optional FRAME
  469.      This returns the root window of frame FRAME.  FRAME defaults to
  470.      the selected frame if not specified.
  471.  
  472.  - Function: window-frame &optional WINDOW
  473.      This function returns the frame that WINDOW is on.  WINDOW
  474.      defaults to the selected window if omitted.
  475.  
  476.    All the non-minibuffer windows in a frame are arranged in a cyclic
  477. order.  The order runs from the frame's top window, which is at the
  478. upper left corner, down and to the right, until it reaches the window at
  479. the lower right corner (always the minibuffer window, if the frame has
  480. one), and then it moves back to the top.
  481.  
  482.  - Function: frame-top-window FRAME
  483.      This returns the topmost, leftmost window of frame FRAME.
  484.  
  485.    At any time, exactly one window on any frame is "selected within the
  486. frame".  The significance of this designation is that selecting the
  487. frame also selects this window.  You can get the frame's current
  488. selected window with `frame-selected-window'.
  489.  
  490.  - Function: frame-selected-window &optional FRAME
  491.      This function returns the window on FRAME that is selected within
  492.      FRAME.  FRAME defaults to the selected frame if not specified.
  493.  
  494.    Conversely, selecting a window for XEmacs with `select-window' also
  495. makes that window selected within its frame.  *Note Selecting Windows::.
  496.  
  497.    Another function that (usually) returns one of the windows in a
  498. frame is `minibuffer-window'.  *Note Minibuffer Misc::.
  499.  
  500. 
  501. File: lispref.info,  Node: Minibuffers and Frames,  Next: Input Focus,  Prev: Frames and Windows,  Up: Frames
  502.  
  503. Minibuffers and Frames
  504. ======================
  505.  
  506.    Normally, each frame has its own minibuffer window at the bottom,
  507. which is used whenever that frame is selected.  If the frame has a
  508. minibuffer, you can get it with `minibuffer-window' (*note Minibuffer
  509. Misc::.).
  510.  
  511.    However, you can also create a frame with no minibuffer (this is not
  512. implemented as of 19.13, but will be in 19.14).  Such a frame must use
  513. the minibuffer window of some other frame.  When you create the frame,
  514. you can specify explicitly the minibuffer window to use (in some other
  515. frame).  If you don't, then the minibuffer is found in the frame which
  516. is the value of the variable `default-minibuffer-frame'.  Its value
  517. should be a frame which does have a minibuffer.
  518.  
  519.  - Variable: default-minibuffer-frame
  520.      This variable specifies the frame to use for the minibuffer
  521.      window, by default.
  522.  
  523. 
  524. File: lispref.info,  Node: Input Focus,  Next: Visibility of Frames,  Prev: Minibuffers and Frames,  Up: Frames
  525.  
  526. Input Focus
  527. ===========
  528.  
  529.    At any time, one frame in XEmacs is the "selected frame".  The
  530. selected window always resides on the selected frame.  As the focus
  531. moves from device to device, the selected frame on each device is
  532. remembered and restored when the focus moves back to that device.
  533.  
  534.  - Function: selected-frame &optional DEVICE
  535.      This function returns the selected frame on DEVICE.  If DEVICE is
  536.      not specified, the selected device will be used.  If no frames
  537.      exist on the device, `nil' is returned.
  538.  
  539.    The X server normally directs keyboard input to the X window that the
  540. mouse is in.  Some window managers use mouse clicks or keyboard events
  541. to "shift the focus" to various X windows, overriding the normal
  542. behavior of the server.
  543.  
  544.    Lisp programs can switch frames "temporarily" by calling the
  545. function `select-frame'.  This does not override the window manager;
  546. rather, it escapes from the window manager's control until that control
  547. is somehow reasserted.
  548.  
  549.    When using a text-only terminal, there is no window manager;
  550. therefore, `select-frame' is the only way to switch frames, and the
  551. effect lasts until overridden by a subsequent call to `select-frame'.
  552. Only the selected terminal frame is actually displayed on the terminal.
  553. Each terminal screen except for the initial one has a number, and the
  554. number of the selected frame appears in the mode line after the word
  555. `Emacs' (*note Modeline Variables::.).
  556.  
  557.  - Function: select-frame FRAME
  558.      This function selects frame FRAME, temporarily disregarding the
  559.      focus of the X server if any.  The selection of FRAME lasts until
  560.      the next time the user does something to select a different frame,
  561.      or until the next time this function is called.
  562.  
  563.    Note that this does not actually cause the window-system focus to be
  564. set to this frame, or the `select-frame-hook' or `deselect-frame-hook'
  565. to be run, until the next time that XEmacs is waiting for an event.
  566.  
  567. 
  568. File: lispref.info,  Node: Visibility of Frames,  Next: Raising and Lowering,  Prev: Input Focus,  Up: Frames
  569.  
  570. Visibility of Frames
  571. ====================
  572.  
  573.    An X window frame may be "visible", "invisible", or "iconified".  If
  574. it is visible, you can see its contents.  If it is iconified, the
  575. frame's contents do not appear on the screen, but an icon does.  If the
  576. frame is invisible, it doesn't show on the screen, not even as an icon.
  577.  
  578.    Visibility is meaningless for TTY frames, since only the selected
  579. one is actually displayed in any case.
  580.  
  581.  - Command: make-frame-visible &optional FRAME
  582.      This function makes frame FRAME visible.  If you omit FRAME, it
  583.      makes the selected frame visible.
  584.  
  585.  - Command: make-frame-invisible &optional FRAME
  586.      This function makes frame FRAME invisible.
  587.  
  588.  - Command: iconify-frame &optional FRAME
  589.      This function iconifies frame FRAME.
  590.  
  591.  - Command: deiconify-frame &optional FRAME
  592.      This function de-iconifies frame FRAME.  Under X, this is
  593.      equivalent to `make-frame-visible'.
  594.  
  595.  - Function: frame-visible-p FRAME
  596.      This returns whether FRAME is currently "visible" (actually in use
  597.      for display).  A frame that is not visible is not updated, and, if
  598.      it works through a window system, may not show at all.
  599.  
  600.  - Function: frame-iconified-p FRAME
  601.      This returns whether FRAME is iconified.  Not all window managers
  602.      use icons; some merely unmap the window, so this function is not
  603.      the inverse of `frame-visible-p'.  It is possible for a frame to
  604.      not be visible and not be iconified either.  However, if the frame
  605.      is iconified, it will not be visible.  (Under FSF Emacs, the
  606.      functionality of this function is obtained through
  607.      `frame-visible-p'.)
  608.  
  609.  - Function: frame-totally-visible-p FRAME
  610.      This returns whether FRAME is not obscured by any other X windows.
  611.      This function always returns `y' on TTY frames.
  612.  
  613. 
  614. File: lispref.info,  Node: Raising and Lowering,  Next: Frame Hooks,  Prev: Visibility of Frames,  Up: Frames
  615.  
  616. Raising and Lowering Frames
  617. ===========================
  618.  
  619.    The X Window System uses a desktop metaphor.  Part of this metaphor
  620. is the idea that windows are stacked in a notional third dimension
  621. perpendicular to the screen surface, and thus ordered from "highest" to
  622. "lowest".  Where two windows overlap, the one higher up covers the one
  623. underneath.  Even a window at the bottom of the stack can be seen if no
  624. other window overlaps it.
  625.  
  626.    A window's place in this ordering is not fixed; in fact, users tend
  627. to change the order frequently.  "Raising" a window means moving it
  628. "up", to the top of the stack.  "Lowering" a window means moving it to
  629. the bottom of the stack.  This motion is in the notional third
  630. dimension only, and does not change the position of the window on the
  631. screen.
  632.  
  633.    You can raise and lower XEmacs's X windows with these functions:
  634.  
  635.  - Command: raise-frame &optional FRAME
  636.      This function raises frame FRAME.
  637.  
  638.  - Command: lower-frame &optional FRAME
  639.      This function lowers frame FRAME.
  640.  
  641.    You can also specify auto-raise (raising automatically when a frame
  642. is selected) or auto-lower (lowering automatically when it is
  643. deselected).  Under X, most ICCCM-compliant window managers will have
  644. an option to do this for you, but the following variables are provided
  645. in case you're using a broken WM.  (Under FSF Emacs, the same
  646. functionality is provided through the `auto-raise' and `auto-lower'
  647. frame parameters.)
  648.  
  649.  - Variable: auto-raise-frame
  650.      This variable's value is `t' if frames will be raised to the top
  651.      when selected.
  652.  
  653.  - Variable: auto-lower-frame
  654.      This variable's value is `t' if frames will be lowered to the
  655.      bottom when no longer selected.
  656.  
  657.    Auto-raising and auto-lowering is implemented through functions
  658. attached to `select-frame-hook' and `deselect-frame-hook' (*note Frame
  659. Hooks::.).  Under normal circumstances, you should not call these
  660. functions directly.
  661.  
  662.  - Function: default-select-frame-hook
  663.      This hook function implements the `auto-raise-frame' variable; it
  664.      is for use as the value of `select-frame-hook'.
  665.  
  666.  - Function: default-deselect-frame-hook
  667.      This hook function implements the `auto-lower-frame' variable; it
  668.      is for use as the value of `deselect-frame-hook'.
  669.  
  670. 
  671. File: lispref.info,  Node: Frame Hooks,  Prev: Raising and Lowering,  Up: Frames
  672.  
  673. Hooks for Customizing Frame Behavior
  674. ====================================
  675.  
  676.    XEmacs provides many hooks that are called at various times during a
  677. frame's lifetime.  *Note Hooks::.
  678.  
  679.  - Variable: create-frame-hook
  680.      This hook is called each time a frame is created.  The functions
  681.      are called with one argument, the newly-created frame.
  682.  
  683.  - Variable: delete-frame-hook
  684.      This hook is called each time a frame is deleted.  The functions
  685.      are called with one argument, the about-to-be-deleted frame.
  686.  
  687.  - Variable: select-frame-hook
  688.      This is a normal hook that is run just after a frame is selected.
  689.      The function `default-select-frame-hook', which implements
  690.      auto-raising (*note Raising and Lowering::.), is normally attached
  691.      to this hook.
  692.  
  693.      Note that calling `select-frame' does not necessarily set the
  694.      focus: The actual window-system focus will not be changed until
  695.      the next time that XEmacs is waiting for an event, and even then,
  696.      the window manager may refuse the focus-change request.
  697.  
  698.  - Variable: deselect-frame-hook
  699.      This is a normal hook that is run just before a frame is deselected
  700.      (and another frame is selected).  The function
  701.      `default-deselect-frame-hook', which implements auto-lowering
  702.      (*note Raising and Lowering::.), is normally attached to this hook.
  703.  
  704.  - Variable: map-frame-hook
  705.      This hook is called each time a frame is mapped (i.e. made
  706.      visible).  The functions are called with one argument, the newly
  707.      mapped frame.
  708.  
  709.  - Variable: unmap-frame-hook
  710.      This hook is called each time a frame is unmapped (i.e. made
  711.      invisible or iconified).  The functions are called with one
  712.      argument, the newly unmapped frame.
  713.  
  714. 
  715. File: lispref.info,  Node: Devices,  Next: Positions,  Prev: Frames,  Up: Top
  716.  
  717. Devices
  718. *******
  719.  
  720.    A "device" is an object representing a connection to a particular
  721. display device, such as an X display or a tty.  Each device has one or
  722. more "frames" in which text can be displayed.  For X displays and the
  723. like, a frame corresponds to the normal window-system concept of a
  724. window.  Frames can overlap, be displayed at various locations within
  725. the display, be resized, etc.  For tty's, only one frame can be
  726. displayed at a time, and it occupies the entire tty display area.
  727. However, you can still define multiple frames and switch between them.
  728. Their contents are entirely separate from each other.  These sorts of
  729. frames resemble the "virtual console" capability provided under Linux
  730. or the multiple screens provided by the multiplexing program `screen'
  731. under Unix.
  732.  
  733.    When you start up XEmacs, an initial device is created to display
  734. frames on.  This will either be an X device or a tty device, depending
  735. on what mode you started XEmacs in (this is determined by the `DISPLAY'
  736. environment variable, the `-nw', `-t' and `-display' command-line
  737. options, etc.).
  738.  
  739.    You can connect to other devices by creating device objects, as
  740. described below.  Many functions (for example the frame-creation
  741. functions) take an optional device argument specifying which device the
  742. function pertains to.  If the argument is omitted, it defaults to the
  743. selected device (see below).
  744.  
  745.  - Function: devicep OBJECT
  746.      This returns non-`nil' if OBJECT is a device.
  747.  
  748. * Menu:
  749.  
  750. * Basic Device Functions::
  751. * Device Types and Classes::
  752. * Connecting to a Device::
  753. * The Selected Device::
  754. * Device Input::
  755.  
  756. 
  757. File: lispref.info,  Node: Basic Device Functions,  Next: Device Types and Classes,  Up: Devices
  758.  
  759. Basic Device Functions
  760. ======================
  761.  
  762.  - Function: device-list
  763.      This function returns a list of all existing devices.
  764.  
  765.  - Function: device-or-frame-p OBJECT
  766.      This function returns non-`nil' if OBJECT is a device or frame.
  767.      This function is useful because devices and frames are similar in
  768.      many respects and many functions can operate on either one.
  769.  
  770.  - Function: device-frame-list DEVICE
  771.      This function returns a list of all frames on DEVICE.
  772.  
  773.  - Function: frame-device FRAME
  774.      This function returns the device that FRAME is on.
  775.  
  776. 
  777. File: lispref.info,  Node: Device Types and Classes,  Next: Connecting to a Device,  Prev: Basic Device Functions,  Up: Devices
  778.  
  779. Device Types and Classes
  780. ========================
  781.  
  782.    Every device is of a particular "type", which describes how the
  783. connection to that device is made and how the device operates, and a
  784. particular "class", which describes other characteristics of the device
  785. (currently, the color capabilities of the device).
  786.  
  787.    The currently-defined device types are
  788.  
  789. `x'
  790.      A connection to an X display (such as `willow:0').
  791.  
  792. `tty'
  793.      A connection to a tty (such as `/dev/ttyp3').
  794.  
  795. `terminal'
  796.      A stdio connection.  This describes a device for which input and
  797.      output is only possible in a stream-like fashion, such as when
  798.      XEmacs in running in batch mode.  The very first device created by
  799.      XEmacs is a terminal device and is used to print out messages of
  800.      various sorts (for example, the help message when you use the
  801.      `-help' command-line option).
  802.  
  803.    The currently-defined device classes are
  804. `color'
  805.      A color device.
  806.  
  807. `grayscale'
  808.      A grayscale device (a device that can display multiple shades of
  809.      gray, but no color).
  810.  
  811. `mono'
  812.      A device that can only display two colors (e.g. black and white).
  813.  
  814.  - Function: device-type DEVICE
  815.      This function returns the type of DEVICE.  This is a symbol whose
  816.      name is one of the device types mentioned above.
  817.  
  818.  - Function: device-or-frame-type DEVICE-OR-FRAME
  819.      This function returns the type of DEVICE-OR-FRAME.
  820.  
  821.  - Function: device-class DEVICE
  822.      This function returns the class (color behavior) of DEVICE.  This
  823.      is a symbol whose name is one of the device classes mentioned
  824.      above.
  825.  
  826.  - Function: valid-device-type DEVICE-TYPE
  827.      This function returns whether DEVICE-TYPE (which should be a
  828.      symbol) species a valid device type.
  829.  
  830.  - Function: valid-device-class DEVICE-CLASS
  831.      This function returns whether DEVICE-CLASS (which should be a
  832.      symbol) species a valid device class.
  833.  
  834.  - Variable: terminal-device
  835.      This variable holds the initial terminal device object, which
  836.      represents XEmacs's stdout.
  837.  
  838. 
  839. File: lispref.info,  Node: Connecting to a Device,  Next: The Selected Device,  Prev: Device Types and Classes,  Up: Devices
  840.  
  841. Connecting to a Device
  842. ======================
  843.  
  844.  - Function: make-device &optional TYPE DEVICE-DATA
  845.      This function creates a new device.
  846.  
  847.    The following two functions create devices of specific types and are
  848. written in terms of `make-device'.
  849.  
  850.  - Function: make-tty-device &optional TTY TERMINAL-TYPE
  851.      This function creates a new tty device on TTY.  This also creates
  852.      the tty's first frame.  TTY should be a string giving the name of
  853.      a tty device file (e.g. `/dev/ttyp3' under SunOS et al.), as
  854.      returned by the `tty' command issued from the Unix shell.  A value
  855.      of `nil' means use the stdin and stdout as passed to XEmacs from
  856.      the shell.  If TERMINAL-TYPE is non-`nil', it should be a string
  857.      specifying the type of the terminal attached to the specified tty.
  858.      If it is `nil', the terminal type will be inferred from the
  859.      `TERM' environment variable.
  860.  
  861.  - Function: make-x-device &optional DISPLAY ARGV-LIST
  862.      This function creates a new device connected to DISPLAY.  Optional
  863.      argument ARGV-LIST is a list of strings describing command line
  864.      options.
  865.  
  866.  - Function: delete-device DEVICE
  867.      This function deletes DEVICE, permanently eliminating it from use.
  868.      This disconnects XEmacs's connection to the device.
  869.  
  870.  - Variable: create-device-hook
  871.      This variable, if non-`nil', should contain a list of functions,
  872.      which are called when a device is created.
  873.  
  874.  - Variable: delete-device-hook
  875.      This variable, if non-`nil', should contain a list of functions,
  876.      which are called when a device is deleted.
  877.  
  878.  - Function: device-live-p OBJECT
  879.      This function returns non-`nil' if OBJECT is a device that has not
  880.      been deleted.
  881.  
  882.  - Function: device-x-display DEVICE
  883.      This function returns the X display which DEVICE is connected to,
  884.      if DEVICE is an X device.
  885.  
  886. 
  887. File: lispref.info,  Node: The Selected Device,  Next: Device Input,  Prev: Connecting to a Device,  Up: Devices
  888.  
  889. The Selected Device
  890. ===================
  891.  
  892.  - Function: select-device DEVICE
  893.      This function selects the device DEVICE.
  894.  
  895.  - Function: selected-device
  896.      This function returns the device which is currently active.
  897.  
  898. 
  899. File: lispref.info,  Node: Device Input,  Prev: The Selected Device,  Up: Devices
  900.  
  901. Device Input
  902. ============
  903.  
  904.  - Function: device-baud-rate DEVICE
  905.      This function returns the output baud rate of DEVICE.
  906.  
  907.  - Function: device-disable-input DEVICE
  908.      This function disables input on device DEVICE.
  909.  
  910.  - Function: device-enable-input DEVICE
  911.      This function enables input on device DEVICE.
  912.  
  913.  - Function: device-function-keymap DEVICE
  914.      This function returns the function key mapping for DEVICE.
  915.  
  916.  - Function: set-device-baud-rate DEVICE RATE
  917.      This function sets the output baud rate of DEVICE to RATE.
  918.  
  919.  - Function: set-device-function-keymap DEVICE KEYMAP
  920.      This function sets the function mapping for DEVICE to KEYMAP.
  921.  
  922. 
  923. File: lispref.info,  Node: Positions,  Next: Markers,  Prev: Devices,  Up: Top
  924.  
  925. Positions
  926. *********
  927.  
  928.    A "position" is the index of a character in the text of a buffer.
  929. More precisely, a position identifies the place between two characters
  930. (or before the first character, or after the last character), so we can
  931. speak of the character before or after a given position.  However, we
  932. often speak of the character "at" a position, meaning the character
  933. after that position.
  934.  
  935.    Positions are usually represented as integers starting from 1, but
  936. can also be represented as "markers"--special objects that relocate
  937. automatically when text is inserted or deleted so they stay with the
  938. surrounding characters.  *Note Markers::.
  939.  
  940. * Menu:
  941.  
  942. * Point::         The special position where editing takes place.
  943. * Motion::        Changing point.
  944. * Excursions::    Temporary motion and buffer changes.
  945. * Narrowing::     Restricting editing to a portion of the buffer.
  946.  
  947. 
  948. File: lispref.info,  Node: Point,  Next: Motion,  Up: Positions
  949.  
  950. Point
  951. =====
  952.  
  953.    "Point" is a special buffer position used by many editing commands,
  954. including the self-inserting typed characters and text insertion
  955. functions.  Other commands move point through the text to allow editing
  956. and insertion at different places.
  957.  
  958.    Like other positions, point designates a place between two characters
  959. (or before the first character, or after the last character), rather
  960. than a particular character.  Usually terminals display the cursor over
  961. the character that immediately follows point; point is actually before
  962. the character on which the cursor sits.
  963.  
  964.    The value of point is a number between 1 and the buffer size plus 1.
  965. If narrowing is in effect (*note Narrowing::.), then point is
  966. constrained to fall within the accessible portion of the buffer
  967. (possibly at one end of it).
  968.  
  969.    Each buffer has its own value of point, which is independent of the
  970. value of point in other buffers.  Each window also has a value of point,
  971. which is independent of the value of point in other windows on the same
  972. buffer.  This is why point can have different values in various windows
  973. that display the same buffer.  When a buffer appears in only one window,
  974. the buffer's point and the window's point normally have the same value,
  975. so the distinction is rarely important.  *Note Window Point::, for more
  976. details.
  977.  
  978.  - Function: point
  979.      This function returns the value of point in the current buffer, as
  980.      an integer.
  981.  
  982.           (point)
  983.                => 175
  984.  
  985.  - Function: point-min
  986.      This function returns the minimum accessible value of point in the
  987.      current buffer.  This is normally 1, but if narrowing is in
  988.      effect, it is the position of the start of the region that you
  989.      narrowed to.  (*Note Narrowing::.)
  990.  
  991.  - Function: point-max
  992.      This function returns the maximum accessible value of point in the
  993.      current buffer.  This is `(1+ (buffer-size))', unless narrowing is
  994.      in effect, in which case it is the position of the end of the
  995.      region that you narrowed to.  (*Note Narrowing::).
  996.  
  997.  - Function: buffer-end FLAG
  998.      This function returns `(point-min)' if FLAG is less than 1,
  999.      `(point-max)' otherwise.  The argument FLAG must be a number.
  1000.  
  1001.  - Function: buffer-size
  1002.      This function returns the total number of characters in the current
  1003.      buffer.  In the absence of any narrowing (*note Narrowing::.),
  1004.      `point-max' returns a value one larger than this.
  1005.  
  1006.           (buffer-size)
  1007.                => 35
  1008.           (point-max)
  1009.                => 36
  1010.  
  1011.  - Variable: buffer-saved-size
  1012.      The value of this buffer-local variable is the former length of the
  1013.      current buffer, as of the last time it was read in, saved or
  1014.      auto-saved.
  1015.  
  1016. 
  1017. File: lispref.info,  Node: Motion,  Next: Excursions,  Prev: Point,  Up: Positions
  1018.  
  1019. Motion
  1020. ======
  1021.  
  1022.    Motion functions change the value of point, either relative to the
  1023. current value of point, relative to the beginning or end of the buffer,
  1024. or relative to the edges of the selected window.  *Note Point::.
  1025.  
  1026. * Menu:
  1027.  
  1028. * Character Motion::       Moving in terms of characters.
  1029. * Word Motion::            Moving in terms of words.
  1030. * Buffer End Motion::      Moving to the beginning or end of the buffer.
  1031. * Text Lines::             Moving in terms of lines of text.
  1032. * Screen Lines::           Moving in terms of lines as displayed.
  1033. * List Motion::            Moving by parsing lists and sexps.
  1034. * Skipping Characters::    Skipping characters belonging to a certain set.
  1035.  
  1036. 
  1037. File: lispref.info,  Node: Character Motion,  Next: Word Motion,  Up: Motion
  1038.  
  1039. Motion by Characters
  1040. --------------------
  1041.  
  1042.    These functions move point based on a count of characters.
  1043. `goto-char' is the fundamental primitive; the other functions use that.
  1044.  
  1045.  - Command: goto-char POSITION
  1046.      This function sets point in the current buffer to the value
  1047.      POSITION.  If POSITION is less than 1, it moves point to the
  1048.      beginning of the buffer.  If POSITION is greater than the length
  1049.      of the buffer, it moves point to the end.
  1050.  
  1051.      If narrowing is in effect, POSITION still counts from the
  1052.      beginning of the buffer, but point cannot go outside the accessible
  1053.      portion.  If POSITION is out of range, `goto-char' moves point to
  1054.      the beginning or the end of the accessible portion.
  1055.  
  1056.      When this function is called interactively, POSITION is the
  1057.      numeric prefix argument, if provided; otherwise it is read from the
  1058.      minibuffer.
  1059.  
  1060.      `goto-char' returns POSITION.
  1061.  
  1062.  - Command: forward-char &optional COUNT
  1063.      This function moves point COUNT characters forward, towards the
  1064.      end of the buffer (or backward, towards the beginning of the
  1065.      buffer, if COUNT is negative).  If the function attempts to move
  1066.      point past the beginning or end of the buffer (or the limits of
  1067.      the accessible portion, when narrowing is in effect), an error is
  1068.      signaled with error code `beginning-of-buffer' or `end-of-buffer'.
  1069.  
  1070.      In an interactive call, COUNT is the numeric prefix argument.
  1071.  
  1072.  - Command: backward-char &optional COUNT
  1073.      This function moves point COUNT characters backward, towards the
  1074.      beginning of the buffer (or forward, towards the end of the
  1075.      buffer, if COUNT is negative).  If the function attempts to move
  1076.      point past the beginning or end of the buffer (or the limits of
  1077.      the accessible portion, when narrowing is in effect), an error is
  1078.      signaled with error code `beginning-of-buffer' or `end-of-buffer'.
  1079.  
  1080.      In an interactive call, COUNT is the numeric prefix argument.
  1081.  
  1082. 
  1083. File: lispref.info,  Node: Word Motion,  Next: Buffer End Motion,  Prev: Character Motion,  Up: Motion
  1084.  
  1085. Motion by Words
  1086. ---------------
  1087.  
  1088.    These functions for parsing words use the syntax table to decide
  1089. whether a given character is part of a word.  *Note Syntax Tables::.
  1090.  
  1091.  - Command: forward-word COUNT
  1092.      This function moves point forward COUNT words (or backward if
  1093.      COUNT is negative).  Normally it returns `t'.  If this motion
  1094.      encounters the beginning or end of the buffer, or the limits of the
  1095.      accessible portion when narrowing is in effect, point stops there
  1096.      and the value is `nil'.
  1097.  
  1098.      In an interactive call, COUNT is set to the numeric prefix
  1099.      argument.
  1100.  
  1101.  - Command: backward-word COUNT
  1102.      This function is just like `forward-word', except that it moves
  1103.      backward until encountering the front of a word, rather than
  1104.      forward.
  1105.  
  1106.      In an interactive call, COUNT is set to the numeric prefix
  1107.      argument.
  1108.  
  1109.      This function is rarely used in programs, as it is more efficient
  1110.      to call `forward-word' with a negative argument.
  1111.  
  1112.  - Variable: words-include-escapes
  1113.      This variable affects the behavior of `forward-word' and everything
  1114.      that uses it.  If it is non-`nil', then characters in the "escape"
  1115.      and "character quote" syntax classes count as part of words.
  1116.      Otherwise, they do not.
  1117.  
  1118. 
  1119. File: lispref.info,  Node: Buffer End Motion,  Next: Text Lines,  Prev: Word Motion,  Up: Motion
  1120.  
  1121. Motion to an End of the Buffer
  1122. ------------------------------
  1123.  
  1124.    To move point to the beginning of the buffer, write:
  1125.  
  1126.      (goto-char (point-min))
  1127.  
  1128. Likewise, to move to the end of the buffer, use:
  1129.  
  1130.      (goto-char (point-max))
  1131.  
  1132.    Here are two commands that users use to do these things.  They are
  1133. documented here to warn you not to use them in Lisp programs, because
  1134. they set the mark and display messages in the echo area.
  1135.  
  1136.  - Command: beginning-of-buffer &optional N
  1137.      This function moves point to the beginning of the buffer (or the
  1138.      limits of the accessible portion, when narrowing is in effect),
  1139.      setting the mark at the previous position.  If N is non-`nil',
  1140.      then it puts point N tenths of the way from the beginning of the
  1141.      buffer.
  1142.  
  1143.      In an interactive call, N is the numeric prefix argument, if
  1144.      provided; otherwise N defaults to `nil'.
  1145.  
  1146.      Don't use this function in Lisp programs!
  1147.  
  1148.  - Command: end-of-buffer &optional N
  1149.      This function moves point to the end of the buffer (or the limits
  1150.      of the accessible portion, when narrowing is in effect), setting
  1151.      the mark at the previous position.  If N is non-`nil', then it puts
  1152.      point N tenths of the way from the end of the buffer.
  1153.  
  1154.      In an interactive call, N is the numeric prefix argument, if
  1155.      provided; otherwise N defaults to `nil'.
  1156.  
  1157.      Don't use this function in Lisp programs!
  1158.  
  1159. 
  1160. File: lispref.info,  Node: Text Lines,  Next: Screen Lines,  Prev: Buffer End Motion,  Up: Motion
  1161.  
  1162. Motion by Text Lines
  1163. --------------------
  1164.  
  1165.    Text lines are portions of the buffer delimited by newline
  1166. characters, which are regarded as part of the previous line.  The first
  1167. text line begins at the beginning of the buffer, and the last text line
  1168. ends at the end of the buffer whether or not the last character is a
  1169. newline.  The division of the buffer into text lines is not affected by
  1170. the width of the window, by line continuation in display, or by how
  1171. tabs and control characters are displayed.
  1172.  
  1173.  - Command: goto-line LINE
  1174.      This function moves point to the front of the LINEth line,
  1175.      counting from line 1 at beginning of the buffer.  If LINE is less
  1176.      than 1, it moves point to the beginning of the buffer.  If LINE is
  1177.      greater than the number of lines in the buffer, it moves point to
  1178.      the end of the buffer--that is, the *end of the last line* of the
  1179.      buffer.  This is the only case in which `goto-line' does not
  1180.      necessarily move to the beginning of a line.
  1181.  
  1182.      If narrowing is in effect, then LINE still counts from the
  1183.      beginning of the buffer, but point cannot go outside the accessible
  1184.      portion.  So `goto-line' moves point to the beginning or end of the
  1185.      accessible portion, if the line number specifies an inaccessible
  1186.      position.
  1187.  
  1188.      The return value of `goto-line' is the difference between LINE and
  1189.      the line number of the line to which point actually was able to
  1190.      move (in the full buffer, before taking account of narrowing).
  1191.      Thus, the value is positive if the scan encounters the real end of
  1192.      the buffer.  The value is zero if scan encounters the end of the
  1193.      accessible portion but not the real end of the buffer.
  1194.  
  1195.      In an interactive call, LINE is the numeric prefix argument if one
  1196.      has been provided.  Otherwise LINE is read in the minibuffer.
  1197.  
  1198.  - Command: beginning-of-line &optional COUNT
  1199.      This function moves point to the beginning of the current line.
  1200.      With an argument COUNT not `nil' or 1, it moves forward COUNT-1
  1201.      lines and then to the beginning of the line.
  1202.  
  1203.      If this function reaches the end of the buffer (or of the
  1204.      accessible portion, if narrowing is in effect), it positions point
  1205.      there.  No error is signaled.
  1206.  
  1207.  - Command: end-of-line &optional COUNT
  1208.      This function moves point to the end of the current line.  With an
  1209.      argument COUNT not `nil' or 1, it moves forward COUNT-1 lines and
  1210.      then to the end of the line.
  1211.  
  1212.      If this function reaches the end of the buffer (or of the
  1213.      accessible portion, if narrowing is in effect), it positions point
  1214.      there.  No error is signaled.
  1215.  
  1216.  - Command: forward-line &optional COUNT
  1217.      This function moves point forward COUNT lines, to the beginning of
  1218.      the line.  If COUNT is negative, it moves point -COUNT lines
  1219.      backward, to the beginning of a line.  If COUNT is zero, it moves
  1220.      point to the beginning of the current line.
  1221.  
  1222.      If `forward-line' encounters the beginning or end of the buffer (or
  1223.      of the accessible portion) before finding that many lines, it sets
  1224.      point there.  No error is signaled.
  1225.  
  1226.      `forward-line' returns the difference between COUNT and the number
  1227.      of lines actually moved.  If you attempt to move down five lines
  1228.      from the beginning of a buffer that has only three lines, point
  1229.      stops at the end of the last line, and the value will be 2.
  1230.  
  1231.      In an interactive call, COUNT is the numeric prefix argument.
  1232.  
  1233.  - Function: count-lines START END
  1234.      This function returns the number of lines between the positions
  1235.      START and END in the current buffer.  If START and END are equal,
  1236.      then it returns 0.  Otherwise it returns at least 1, even if START
  1237.      and END are on the same line.  This is because the text between
  1238.      them, considered in isolation, must contain at least one line
  1239.      unless it is empty.
  1240.  
  1241.      Here is an example of using `count-lines':
  1242.  
  1243.           (defun current-line ()
  1244.             "Return the vertical position of point..."
  1245.             (+ (count-lines (window-start) (point))
  1246.                (if (= (current-column) 0) 1 0)
  1247.                -1))
  1248.  
  1249.    Also see the functions `bolp' and `eolp' in *Note Near Point::.
  1250. These functions do not move point, but test whether it is already at the
  1251. beginning or end of a line.
  1252.  
  1253.